<template>
  <div>
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
      <el-breadcrumb-item>项目详细信息</el-breadcrumb-item>
    </el-breadcrumb>
    <!-- <table border="0" width="100%" style="background-color: #EBEEF5; border: 10px solid #EBEEF5; border-radius: 20px;" cellspacing="0" cellpadding="0">
      <tr>
        <td style="height: 56px; padding-left: 30px;">基本信息</td>
      </tr>
      <tr>
        <td style="background-color: #ffffff;">基本信息</td>
      </tr>
    </table> -->
    <!-- 基本信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">基本信息</span>
      </div>
      <div class="text">
        <table border="0" width="100%" cellspacing="0" cellpadding="0">
          <tr>
            <td width="34%" height="30px">年份：{{queryInfo.year}}</td>
            <td width="33%">序号：{{queryInfo.serialNo}}</td>
            <td width="33%">区域：{{queryInfo.area}}</td>
          </tr>
          <tr>
            <td height="30px">项目名称：{{queryInfo.projectName}}</td>
            <td>委托金额：{{queryInfo.entrustMoney}}</td>
            <td>成本金额：{{queryInfo.costMoney}}</td>
          </tr>
          <tr>
            <td height="30px">不含税价：{{queryInfo.priceExcludingTax}}</td>
            <td>结算金额：{{queryInfo.settlementMoney}}</td>
            <td>结算金额不含税：{{queryInfo.settlementMoneyExcludingTax}}</td>
          </tr>
          <tr>
            <td height="40px"><!-- 上家开票（万元）：{{queryInfo.previousInvoicing}} --></td>
            <td><!-- 下家开票（万元）：{{queryInfo.nextInvoicing}} --></td>
            <td>加成率：{{queryInfo.markUpRate}}%</td>
          </tr>
          <tr>
            <!-- <td height="30px">委托时间：{{queryInfo.entrustTime === undefined ? null : formateDate(queryInfo.entrustTime)}}</td> -->
            <td height="30px">委托时间：{{queryInfo.entrustTime}}</td>
            <td>询价时间：{{queryInfo.inquiryTime}}</td>
            <td>合同签订时间：{{queryInfo.contractSignTime}}</td>
          </tr>
          <tr>
            <td height="30px">终验时间：{{queryInfo.finalInspectionTime}}</td>
            <td>结算时间：{{queryInfo.settlementTime}}</td>
            <td>维护周期（年）：{{queryInfo.maintenanceCycle}}</td>
          </tr>
          <tr>
            <td height="30px">移动项目编号：{{queryInfo.mobileProjectNo}}</td>
            <td>项目经理：{{queryInfo.projectManager}}</td>
            <td>服务经理：{{queryInfo.serviceManager}}</td>
          </tr>
          <tr>
            <td height="30px">当前阶段：{{queryInfo.currentStage}}</td>
            <td>供应商：{{queryInfo.supplier}}</td>
            <td>联系人：{{queryInfo.contacts}}</td>
          </tr>
          <tr>
            <td height="30px">委托时现场是否已完工：{{queryInfo.isFinish}}</td>
            <td>是否已交维：{{queryInfo.isMaintain}}</td>
            <td>项目录入时间：{{queryInfo.createTime}}</td>
          </tr>
          <tr>
            <td height="30px">提计应收：{{queryInfo.income}}</td>
            <td>提计实收：{{queryInfo.actuallyIncome}}</td>
            <td>入账时间：{{queryInfo.incomeTime}}</td>
          </tr>
        </table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <el-row>
      <el-col :span="6"><el-button type="primary" @click="showstartReportDialog">打印开工报告</el-button></el-col>
      <el-col :span="6"></el-col>
      <el-col :span="6"></el-col>
      <el-col :span="6"></el-col>
    </el-row>
    <div style="height: 5px;"></div>
    <el-row>
      <el-col :span="12">
        <!-- 合同信息 -->
        <el-card style="width: 99%;">
          <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
            <span style="color: #40AAFF; font-weight: bold;">合同信息</span>
          </div>
          <div class="text">
            <table border="0" width="100%" cellspacing="0" cellpadding="0" class="topleft">
              <tr>
                <td width="12%" height="30px" class="bottomright">合同类别</td>
                <td width="16%" class="bottomright">委托金额</td>
                <td width="16%" class="bottomright">成本金额</td>
                <td width="16%" class="bottomright">不含税价</td>
                <td width="16%" class="bottomright">结算金额</td>
                <td width="17%" class="bottomright">结算金额不含税</td>
                <td width="7%" class="bottomright">税率</td>
              </tr>
              <tr v-for="item in contractinfo" :key="item.id">
                <td height="30px" class="bottomright">{{item.contractKind}}</td>
                <td class="bottomright">{{item.entrustMoney}}</td>
                <td class="bottomright">{{item.costMoney}}</td>
                <td class="bottomright">{{item.priceExcludingTax}}</td>
                <td class="bottomright">{{item.settlementMoney}}</td>
                <td class="bottomright">{{item.settlementMoneyExcludingTax}}</td>
                <td class="bottomright">{{item.tax}}%</td>
              </tr>
            </table>
            <!-- <table border="0" width="100%" cellspacing="0" cellpadding="0" class="topleft">
              <tr>
                <td width="8%" height="30px" class="bottomright">合同类别：</td>
                <td width="17%" class="bottomright">委托金额(元)</td>
                <td width="17%" class="bottomright">成本金额(元)</td>
                <td width="17%" class="bottomright">不含税价(元)</td>
                <td width="17%" class="bottomright">结算金额(元)</td>
                <td width="17%" class="bottomright">结算金额不含税(元)</td>
                <td width="7%" class="bottomright">税率</td>
              </tr>
              <tr :class="[queryInfo.entrustMoney1 === 0 ? 'ds' : '']">
                <td height="30px" class="bottomright">{{queryInfo.contractsignkind1}}</td>
                <td class="bottomright">{{queryInfo.entrustMoney1}}</td>
                <td class="bottomright">{{queryInfo.costMoney1}}</td>
                <td class="bottomright">{{queryInfo.priceExcludingTax1}}</td>
                <td class="bottomright">{{queryInfo.settlementMoney1}}</td>
                <td class="bottomright">{{queryInfo.settlementMoneyExcludingTax1}}</td>
                <td class="bottomright">{{queryInfo.tax1}}%</td>
              </tr>
              <tr :class="[queryInfo.entrustMoney2 === 0 ? 'ds' : '']">
                <td height="30px" class="bottomright">{{queryInfo.contractsignkind2}}</td>
                <td class="bottomright">{{queryInfo.entrustMoney2}}</td>
                <td class="bottomright">{{queryInfo.costMoney2}}</td>
                <td class="bottomright">{{queryInfo.priceExcludingTax2}}</td>
                <td class="bottomright">{{queryInfo.settlementMoney2}}</td>
                <td class="bottomright">{{queryInfo.settlementMoneyExcludingTax2}}</td>
                <td class="bottomright">{{queryInfo.tax2}}%</td>
              </tr>
              <tr :class="[queryInfo.entrustMoney3 === 0 ? 'ds' : '']">
                <td height="30px" class="bottomright">{{queryInfo.contractsignkind3}}</td>
                <td class="bottomright">{{queryInfo.entrustMoney3}}</td>
                <td class="bottomright">{{queryInfo.costMoney3}}</td>
                <td class="bottomright">{{queryInfo.priceExcludingTax3}}</td>
                <td class="bottomright">{{queryInfo.settlementMoney3}}</td>
                <td class="bottomright">{{queryInfo.settlementMoneyExcludingTax3}}</td>
                <td class="bottomright">{{queryInfo.tax3}}%</td>
              </tr>
              <tr :class="[queryInfo.entrustMoney4 === 0 ? 'ds' : '']">
                <td height="30px" class="bottomright">{{queryInfo.contractsignkind4}}</td>
                <td class="bottomright">{{queryInfo.entrustMoney4}}</td>
                <td class="bottomright">{{queryInfo.costMoney4}}</td>
                <td class="bottomright">{{queryInfo.priceExcludingTax4}}</td>
                <td class="bottomright">{{queryInfo.settlementMoney4}}</td>
                <td class="bottomright">{{queryInfo.settlementMoneyExcludingTax4}}</td>
                <td class="bottomright">{{queryInfo.tax4}}%</td>
              </tr>
            </table> -->
          </div>
        </el-card></el-col>
      <el-col :span="12">
        <!-- 移动计提表 -->
        <el-card>
          <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
            <span style="color: #40AAFF; font-weight: bold;">移动计提表信息</span>
          </div>
          <div class="text">
            <table border="0" width="100%" cellspacing="0" cellpadding="0" class="topleft">
              <tr>
                <td width="8%" height="30px" class="bottomright">业务名称</td>
                <!-- <td width="17%" class="bottomright">客户名称</td> -->
                <td width="17%" class="bottomright">收入确认时间</td>
                <td width="17%" class="bottomright">验收时点</td>
                <td width="17%" class="bottomright">累计分摊收入</td>
                <td width="17%" class="bottomright">累计实收金额</td>
                <td width="7%" class="bottomright">税率</td>
              </tr>
              <tr v-for="item in mobileAccrualInfo" :key="item.id">
                <td height="30px" class="bottomright">{{item.businessName}}</td>
                <!-- <td class="bottomright">{{item.customerName}}</td> -->
                <td class="bottomright">{{item.incomeTime}}</td>
                <td class="bottomright">{{item.acceptTime}}</td>
                <td class="bottomright">{{item.cumulativeAllocationIncome}}</td>
                <td class="bottomright">{{item.cumulativeActualIncomeAmount}}</td>
                <td class="bottomright">{{item.tax}}%</td>
              </tr>
            </table>
          </div>
        </el-card>
      </el-col>
    </el-row>
    <div style="height: 5px;"></div>
    <!-- 合同审批工作联系单附件信息 -->
    <el-card>
      <div slot="header" class="clearfix">
        <span style="color: #40AAFF; font-weight: bold;">合同审批工作联系单</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload0"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract0list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名">
            <template slot-scope="scope">
              <div @click="DownloadFile(scope.row.fileId,scope.row.originFileName)" style="color: #4169E1;cursor: pointer;" class="nfive">{{scope.row.originFileName}}</div>
            </template>
          </el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 下家合同附件信息 -->
    <el-card>
      <div slot="header" class="clearfix">
         <span style="color: #40AAFF; font-weight: bold;">下家合同</span>
         <el-button size="small" type="primary" @click="showUploadDialog" style="float: right; text-align: right;">点击上传</el-button>
      </div>
      <div class="text">
        <el-table :data="contractlist" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名">
            <template slot-scope="scope">
              <div @click="DownloadFile(scope.row.fileId,scope.row.originFileName)" style="color: #4169E1;cursor: pointer;" class="nfive">{{scope.row.originFileName}}</div>
            </template>
          </el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 供应链订单附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">供应链订单</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload9"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract9list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 开工报告附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">开工报告</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload3"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract3list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 到货单附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">到货单</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload4"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract4list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 上线报告附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">上线报告</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload5"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract5list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 竣工资料附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">竣工资料</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload6"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract6list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 终验证书附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">终验证书</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload7"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract7list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 业主验收附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">业主验收</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload8"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract8list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 5px;"></div>
    <!-- 上家合同附件信息 -->
    <el-card>
      <div slot="header" class="clearfix" style="border-bottom;: 1px solid #EBEEF5">
        <span style="color: #40AAFF; font-weight: bold;">上家合同(移动对业主的合同)</span>
        <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload2"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="false"
          :data="canshu"
          style="float: right; text-align: right;"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="isupload">点击上传</el-button>
        </el-upload>
        <span slot="tip" class="el-upload__tip" style="float: right; text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span>
      </div>
      <div class="text">
        <el-table :data="contract2list" border stripe :header-cell-style="{background:'#F5F7FA'}">
          <el-table-column type="index"></el-table-column>
          <el-table-column label="文件名" prop="originFileName"></el-table-column>
          <el-table-column label="附件类型" prop="fileKind" width='100'></el-table-column>
          <el-table-column label="附件后缀名" prop="fileExtension" width='100'></el-table-column>
          <el-table-column label="上传人" prop="uploader" width='100'></el-table-column>
          <el-table-column label="上传时间" prop="createTime" width='180'>
            <template slot-scope="scope">
              {{scope.row.createTime}}
            </template>
          </el-table-column>
          <el-table-column label="操作" width="150px">
            <template slot-scope="scope">
              <!-- 登录后要保存部门ID，这里把部门ID传进去来判断显示那个按钮 -->
              <el-button size="mini" type="primary" :disabled="isdownload" @click="DownloadFile(scope.row.fileId,scope.row.originFileName)">下载</el-button>
              <el-button size="mini" type="primary" :disabled="isdelete" @click="DeteleFile(scope.row.fileId,scope.row.originFileName,scope.row.fileFullPath)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
      </div>
    </el-card>
    <div style="height: 20px;"></div>
    <!-- 下家合同上传 -->
    <el-dialog title="下家合同上传" :visible.sync="UploadDialogVisible" width="50%" @close="UploadDialogClosed">
        <!-- 合同签订时间 -->
        <div>
        <el-form :model="projectInfo" :rules="uploadFormRules" ref="uploadFormRef" label-width="100px" label-position="right">
          <el-form-item label="合同签订日期" prop="contractSignTime">
            <el-date-picker v-model="projectInfo.contractSignTime" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
          </el-form-item>
        </el-form>
        </div>
        <div><el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/uploadfiles"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          :before-upload="beforeupload"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          :show-file-list="true"
          :data="canshu"
          :auto-upload="false"
          >

          <el-button slot="trigger" size="small" type="primary" ref="up1" :disabled="isupload">选择上传文件</el-button>
        </el-upload></div>
        <div><span slot="tip" class="el-upload__tip" style="text-align: right;padding-right: 5px;">支持多文件上传，最多同时上传5个文件，文件大小不能超过10MB</span></div>
        <el-row>
          <el-col :span="12"></el-col>
          <el-col :span="12"></el-col>
        </el-row>
        <!-- <el-upload
          class="upload-demo"
          action="http://172.25.161.19:100/api/upload"
          :on-preview="handlePreview"
          :on-remove="handleRemove1"
          :before-remove="beforeRemove"
          :on-success="handlesuccess1"
          multiple
          :limit="5"
          :on-exceed="handleExceed"
          :file-list="list1"
          ref="upload1"
          :disabled="dis"
          >
          <el-button size="small" type="primary" ref="up1" :disabled="dis">点击上传2</el-button>
          <div slot="tip" class="el-upload__tip">支持多文件上传，最多上传5个文件，文件大小不能超过10MB</div>
        </el-upload> -->
        <!-- <el-button style="float: right;" @click="showEditDialog(queryInfo.ID)" type="primary">上传合同</el-button> -->
        <!-- <el-button style="float: right;" @click="showEditDialog(scope.row.ID)" type="primary">上传合同</el-button> -->
      <span slot="footer" class="dialog-footer">
        <el-button @click="UploadDialogVisible = false">取消上传</el-button>
        <el-button type="primary" @click="submitUpload">点击上传</el-button>
      </span>
    </el-dialog>
    <!-- 打印开工报告 -->
    <el-dialog title="打印开工报告" :visible.sync="startReportDialogVisible" width="950px" @close="startReportDialogClosed">
      <div id="printTest" style="text-align: center;">
        <div style="font-size: 40px; text-align: center; width: 944px; font-family: '宋体'; color: #000000; padding-bottom: 20px;">开工报告</div>
        <table style="height: 200px;" class="table">
          <tr>
            <td width="160">工 程 名 称</td>
            <td width="312" style="text-align:left">123{{queryInfo.projectName}}</td>
            <td width="170">项 目 编 号</td>
            <td width="312" style="text-align:left">{{queryInfo.mobileProjectNo}}</td>
          </tr>
          <tr>
            <td>建 设 地 点</td>
            <td colspan="3" style="text-align:left">温州{{queryInfo.area}}</td>
          </tr>
          <tr>
            <td>建 设 单 位</td>
            <td colspan="3" style="text-align:left">中国移动通信集团浙江有限公司温州分公司</td>
          </tr>
          <tr>
            <td>承 建 单 位</td>
            <td colspan="3" style="text-align:left">中移建设有限公司浙江分公司</td>
          </tr>
          <tr>
            <td>施 工 单 位</td>
            <td colspan="3" style="text-align:left">{{print.supplier}}<el-input v-model="queryInfo.supplier" v-show="isshow" placeholder="请输入内容"></el-input></td>
          </tr>
          <tr>
            <td>监理单位/人员</td>
            <td colspan="3" style="text-align:left">{{print.supervisor}}<el-input v-model="printBefore.supervisor" v-show="isshow" placeholder="请输入内容"></el-input></td>
          </tr>
          <tr>
            <td>开 工 十 日</td>
            <td style="text-align:left">{{print.entrustTime}}<el-date-picker value-format="yyyy-MM-dd" v-model="queryInfo.entrustTime" v-show="isshow" type="date" placeholder="选择日期"></el-date-picker></td>
            <td>计划完工日期</td>
            <td style="text-align:left">{{print.finishTime}}<el-date-picker value-format="yyyy-MM-dd" v-model="printBefore.finishTime" v-show="isshow" type="date" placeholder="选择日期"></el-date-picker></td>
          </tr>
          <tr>
            <td style="text-align:left; height: 200px; vertical-align: top;" colspan="4">工程准备情况：{{print.prepare}}<el-input v-model="printBefore.prepare" v-show="isshow" type="textarea" :rows="5" placeholder="请输入内容"></el-input></td>
          </tr>
          <tr>
            <td style="text-align:left; height: 200px; vertical-align: top;" colspan="4">{{print.problem}}<el-input v-model="printBefore.problem" v-show="isshow" type="textarea" :rows="5" placeholder="请输入内容"></el-input></td>
          </tr>
          <tr>
            <td style="text-align:left; height: 200px; vertical-align: top;" colspan="4">
              <div style="height:130px">同意开工</div>
              <div style="text-align:right;">业主单位:{{print.owner}}<el-input v-model="printBefore.owner" v-show="isshow" :rows="5" placeholder="请输入内容" style="width: 200px;"></el-input>{{print.riqi}}<el-date-picker v-model="printBefore.riqi" value-format="yyyy-MM-dd" v-show="isshow" type="date" placeholder="选择日期"></el-date-picker></div>
            </td>
          </tr>
          <tr>
            <td style="text-align:left; height: 200px; vertical-align: top;" colspan="4">
              <div style="text-align:center; width: 100%; height:100px">申请本工程于 {{print.riqi2}}<el-date-picker value-format="yyyy-MM-dd" v-model="printBefore.riqi2" v-show="isshow" type="date" placeholder="选择日期"></el-date-picker> 正式开工，特此报告</div>
              <div style="text-align:right;">填报单位：中移建设有限公司浙江分公司</div>
              <div style="text-align:right;">报送日期：{{print.riqi3}}<el-date-picker value-format="yyyy-MM-dd" v-model="printBefore.riqi3" v-show="isshow" type="date" placeholder="选择日期"></el-date-picker></div>
            </td>
          </tr>
        </table>
      </div>
      <!-- <el-button type="primary" v-print="'#printTest'" @click="fuzhi">打印</el-button> -->
      <span slot="footer" class="dialog-footer">
        <el-button @click="startReportDialogVisible = false">取 消</el-button>
        <el-button type="primary" v-print="'#printTest'" @click="fuzhi">打 印</el-button>
      </span>
    </el-dialog>
  </div>
</template>

<script>
// import { isNull } from 'lodash'
export default {
  data() {
    return {
      // 打印数据
      print: {
        supplier: '',
        supervisor: '',
        entrustTime: '',
        finishTime: '',
        prepare: '',
        problem: '',
        owner: '',
        riqi: '',
        riqi2: '',
        riqi3: ''
      },
      printBefore: {
        // supplier: '',
        supervisor: '',
        // entrustTime: '',
        finishTime: '',
        prepare: '',
        problem: '存在的主要问题、提前或推迟的原因：无。',
        owner: '',
        riqi: '',
        riqi2: '',
        riqi3: ''
      },
      shuju: '',
      // 打印数据
      shuju2: '',
      // 显示输入组件
      isshow: true,
      // 上传附带参数
      canshu: {
        ProjectID: '',
        FileKind: '',
        Uploader: '',
        Year: '',
        SerialNo: '',
        ProjectName: '',
        Rid: '',
        RoleName: ''
      },
      // 合同签订时间参数
      projectInfo: {
        contractSignTime: ''
      },
      // 对话框显示或隐藏
      UploadDialogVisible: false,
      // 打印开工报告框显示或隐藏
      startReportDialogVisible: false,
      editForm: {
        id: '',
        score1: '',
        filelist1: [],
        bz1: '',
        score2: '',
        filelist2: [],
        bz2: '',
        score3: '',
        filelist3: [],
        bz3: ''
      },
      editFormRules: {
        bz1: [
          { required: true, message: '请输入登录名称', trigger: 'blur' },
          { min: 3, max: 10, message: '长度在 3 到 10 个字符', trigger: 'blur' }
        ],
        score1: [
          // { type: 'number', message: '必须为数字值', trigger: 'blur' },
          { min: 1, max: 3, message: '长度在 1 到 3 个字符', trigger: 'blur' }
        ],
        score2: [
          // { type: 'number', message: '必须为数字值', trigger: 'blur' },
          { min: 1, max: 3, message: '长度在 1 到 3 个字符', trigger: 'blur' }
        ],
        score3: [
          // { type: 'number', message: '必须为数字值', trigger: 'blur' },
          { min: 1, max: 3, message: '长度在 1 到 3 个字符', trigger: 'blur' }
        ]
      },
      list1: [],
      list2: [],
      list3: [],
      // 是否允许上传附件
      dis: false,
      // 是否允许上传
      isupload: true,
      // 是否允许下载
      isdownload: true,
      // 是否允许删除附件
      isdelete: true,
      // 合同签订日期输入框
      contractSignTime: '',
      // 工作联系单列表
      contract0list: [],
      // 上家合同列表
      contractlist: [],
      // 下家合同列表
      contract2list: [],
      // 开工报告列表
      contract3list: [],
      // 到货单列表
      contract4list: [],
      // 上线报告
      contract5list: [],
      // 竣工资料
      contract6list: [],
      // 终验证书
      contract7list: [],
      // 业主验收
      contract8list: [],
      // 供应链订单
      contract9list: [],
      // 合同信息
      contractinfo: [],
      // 移动计提表业务名称对应信息
      databaseprojectkindnamelist: [],
      // 移动计提表信息
      mobileAccrualInfo: [],
      // 项目详细信息
      queryInfo: {
        // 年份
        year: '',
        // 序号
        serialNo: '',
        // 区域
        area: '',
        // 项目名称
        projectName: '',
        // // 委托金额
        // entrustmoney: '',
        // // 成本金额
        // costmoney: '',
        // // 不含税价
        // priceexcludingtax: '',
        // // 结算金额
        // settlementmoney: '',
        // // 结算金额不含税
        // settlementmoneyexcludingtax: '',
        // // 上家开票
        // previousinvoicing: '',
        // // 下家开票
        // nextinvoicing: '',
        // // 加成率
        // markuprate: '',
        // 委托时间
        entrustTime: '',
        // // 询价时间
        // inquirytime: '',
        // // 合同签订时间
        // contractsigntime: '',
        // // 终验时间
        // finalinspectiontime: '',
        // // 结算时间
        // settlementtime: '',
        // // 维护周期（年）
        // maintenancecycle: '',
        // 移动项目编号
        mobileProjectNo: ''
        // // 监理单位
        // supervisor: '',
        // // 计划完成日期
        // finishTime: '',
        // prepare: '',
        // problem: ''
        // // 项目经理
        // projectmanager: '',
        // // 服务经理
        // servicemanager: '',
        // // 当前阶段
        // currentstage: '',
        // // 供应商
        // supplier: '',
        // // 联系人
        // contacts: '',
        // // 委托时现场是否已完工
        // isfinish: '',
        // // 是否已交维
        // ismaintain: '',
        // // 项目录入时间
        // createtime: '',
        // // 提计应收
        // income: '',
        // // 提计实收
        // actuallyincome: '',
        // // 入账时间
        // incometime: ''
      },
      uploadFormRules: {}
    }
  },
  created() {
    // 计提表业务名称对应表信息
    this.getProjectKindNameList()
    this.menuright()
    // console.log(this.$route.query.id)
    this.getProjectInfo()
    // 上传附件前的附带参数赋值
    this.canshu.ProjectID = this.$route.query.id
    this.canshu.Uploader = window.sessionStorage.getItem('name')
    this.canshu.Rid = window.sessionStorage.getItem('rid')
    this.canshu.RoleName = window.sessionStorage.getItem('rolename')
    // 打印日期
    this.printBefore.riqi2 = this.formateDate2()
    this.printBefore.riqi3 = this.formateDate2()
    // this.canshu.Year = this.queryInfo.year
    // this.canshu.SerialNo = this.queryInfo.serialNo
    // this.canshu.ProjectName = this.queryInfo.projectName
    // console.log(this.queryInfo)
    // console.log(this.queryInfo.serialNo)
    // console.log(this.queryInfo.projectName)
    // console.log(this.canshu.ProjectID)
    // console.log(this.canshu.Uploader)
    // console.log(this.canshu.Year)
    // console.log(this.canshu.SerialNo)
    // console.log(this.canshu.ProjectName)
  },
  mounted() {

    //   this.canshu.projectid = this.$route.query.id
    //   this.canshu.filekind = '下家合同'
    //   this.canshu.uploader = window.sessionStorage.getItem('username')
    //   console.log(canshu)
    //   console.log(this.queryInfo)

  },
  methods: {
    formateDate(datetime) {
      console.log('日期格式转换', datetime)
      function addzero(num) {
        return (num < 10 ? '0' + num : num)
      }
      // console.log(datetime)
      if (datetime === null) {
        return
      }
      var date = new Date(datetime)
      return date.getFullYear() + '年' + (addzero(date.getMonth() + 1)) + '月' + addzero(date.getDate()) + '日'
    },
    formateDate2() {
      function addzero(num) {
        return (num < 10 ? '0' + num : num)
      }
      var date = new Date()
      return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate())
    },
    // 判断是否有权限访问该页面，如果有就显示该页面所有的3极权限
    async menuright() {
      const { data: res } = await this.$http.get('menuright?path=' + window.location.hash.slice(2).toLowerCase() + '&rid=' + sessionStorage.getItem('rid'))
      // console.log('路径')
      // console.log(window.location.hash.slice(2).toLowerCase())
      // console.log('权限查询结果')
      // console.log(res)
      if (res.meta.status === 404) {
        window.history.back()
        return this.$message.error('您无权访问该页面！已退回前一页')
      }
      console.log('显示当前页面所拥有的权限', res.right3ji)
      // 该页面上有上传附件，下载附件，和删除附件功能
      res.right3ji.forEach(item => {
        if (item.authName === '附件上传') {
          this.isupload = false
        }
        if (item.authName === '附件下载') {
          this.isdownload = false
        }
        if (item.authName === '附件删除') {
          this.isdelete = false
        }
      })
    },
    // 移动计提表业务名称对应信息
    async getProjectKindNameList() {
      // 获取合同类目名称对比列表
      const { data: res } = await this.$http.get('contractskindnamelist')
      if (res.meta.status !== 200) {
        return this.$message.error('获取合同类目名称对比列表失败！')
      }
      this.databaseprojectkindnamelist = res.data
      // res.data.forEach(item => {
      //   console.log(item)
      // })
      console.log('移动计提表业务名称对应信息', this.databaseprojectkindnamelist)
    },
    // 获取项目详细信息
    async getProjectInfo() {
      // 日期格式转换
      function formateDate(datetime) {
        // console.log('日期格式转换')
        // console.log(datetime)
        function addzero(num) {
          return (num < 10 ? '0' + num : num)
        }
        // console.log(datetime)
        if (datetime === null) {
          return
        }
        var date = new Date(datetime)
        return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate())
      }
      // 日期格式转换
      function formateDate2(datetime) {
        // console.log('日期格式转换')
        // console.log(datetime)
        function addzero(num) {
          return (num < 10 ? '0' + num : num)
        }
        // console.log(datetime)
        if (datetime === null) {
          return
        }
        var date = new Date(datetime)
        return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate() + ' ' + date.getHours() + ':' + date.getMinutes() + ':' + date.getSeconds())
      }
      const { data: res } = await this.$http.get('/ProjectInfo/' + this.$route.query.id)
      if (res.meta.status !== 200) {
        return this.$message.error('获取项目信息失败！')
      }
      if (res.meta.status === 200) {
        // console.log(this.queryInfo)
        // console.log(res.data)
        // 工作联系单列表清空
        this.contract0list = []
        // 下家合同列表清空
        this.contractlist = []
        // 上家合同列表清空
        this.contract2list = []
        // 开工报告清空
        this.contract3list = []
        // 到货单清空
        this.contract4list = []
        // 上线报告清空
        this.contract5list = []
        // 竣工报告清空
        this.contract6list = []
        // 终验证书清空
        this.contract7list = []
        // 业主验收清空
        this.contract8list = []
        // 供应链订单清空
        this.contract9list = []
        this.queryInfo = res.data
        // 日期格式化
        this.queryInfo.entrustTime = formateDate(this.queryInfo.entrustTime)
        this.queryInfo.inquiryTime = formateDate(this.queryInfo.inquiryTime)
        this.queryInfo.contractSignTime = formateDate(this.queryInfo.contractSignTime)
        this.queryInfo.finalInspectionTime = formateDate(this.queryInfo.finalInspectionTime)
        this.queryInfo.settlementTime = formateDate(this.queryInfo.settlementTime)
        this.queryInfo.createTime = formateDate(this.queryInfo.createTime)
        this.queryInfo.incomeTime = formateDate(this.queryInfo.incomeTime)
        console.log('项目详细数据', this.queryInfo)
        this.contractinfo = res.contractInfo
        // 合同信息处理
        this.contractinfo.forEach(item => {
          item.tax = item.tax * 100
        })
        console.log('合同信息', res.contractInfo)
        // 移动计提信息处理
        console.log('移动计提表信息', res.mobileAccrualInfo)
        // 定义四个空对象
        var shebei = { businessName: '', incomeTime: '', acceptTime: '', cumulativeAllocationIncome: 0, cumulativeActualIncomeAmount: 0, tax: '' }
        var jicheng = { businessName: '', incomeTime: '', acceptTime: '', cumulativeAllocationIncome: 0, cumulativeActualIncomeAmount: 0, tax: '' }
        var shigong = { businessName: '', incomeTime: '', acceptTime: '', cumulativeAllocationIncome: 0, cumulativeActualIncomeAmount: 0, tax: '' }
        var weihu = { businessName: '', incomeTime: '', acceptTime: '', cumulativeAllocationIncome: 0, cumulativeActualIncomeAmount: 0, tax: '' }
        // var shebei = null
        // var jicheng = null
        // var shigong = null
        // var weihu = null
        // 遍历计提表数据
        res.mobileAccrualInfo.forEach(item => {
          // ------------计提表的业务名称修改成我们的政企部的业务名称-----------------
          var info = this.databaseprojectkindnamelist.find(o => o.businessName === item.businessName)
          item.businessName = info.simpleName
          // --------------End---------------
          // -------给四个空对象累加数据--------
          if (item.businessName === '设备') {
            shebei.businessName = '设备'
            // 如果收入确认时间不等于空
            if (item.incomeTime !== '') {
              // 和自定义的对象的收入确认时间对比
              if (shebei.incomeTime === '') {
                shebei.incomeTime = item.incomeTime
              } else { // 自定义的收入确认时间不为空
                console.log('new Date(item.incomeTime)', new Date(item.incomeTime))
                console.log('new Date(shebei.incomeTime)', new Date(shebei.incomeTime))
                if (new Date(item.incomeTime) > new Date(shebei.incomeTime)) {
                  shebei.incomeTime = item.incomeTime
                }
              }
            }
            // shebei.incomeTime = item.incomeTime
            // 如果验收时点不等于空
            if (item.acceptTime !== '') {
              // 和自定义的对象的验收时点对比
              if (shebei.acceptTime === '') {
                shebei.acceptTime = item.acceptTime
              } else { // 自定义的验收时点不为空
                if (parseInt(item.acceptTime) > parseInt(shebei.acceptTime)) {
                  shebei.acceptTime = item.acceptTime
                }
              }
            }
            shebei.cumulativeAllocationIncome = shebei.cumulativeAllocationIncome + item.cumulativeAllocationIncome
            shebei.cumulativeActualIncomeAmount = shebei.cumulativeActualIncomeAmount + item.cumulativeActualIncomeAmount
            shebei.tax = item.tax
          }
          if (item.businessName === '集成') {
            jicheng.businessName = '集成'
            // 如果收入确认时间不等于空
            if (item.incomeTime !== '') {
              // 和自定义的对象的收入确认时间对比
              if (jicheng.incomeTime === '') {
                // console.log('item.incomeTime', item.incomeTime)
                jicheng.incomeTime = item.incomeTime
              } else { // 自定义的收入确认时间不为空
                // console.log('new Date(item.incomeTime)', new Date(item.incomeTime))
                // console.log('new Date(jicheng.incomeTime)', new Date(jicheng.incomeTime))
                if (new Date(item.incomeTime) > new Date(jicheng.incomeTime)) {
                  jicheng.incomeTime = item.incomeTime
                }
              }
            }
            // 如果验收时点不等于空
            if (item.acceptTime !== '') {
              // 和自定义的对象的验收时点对比
              if (jicheng.acceptTime === '') {
                jicheng.acceptTime = item.acceptTime
              } else { // 自定义的验收时点不为空
                if (parseInt(item.acceptTime) > parseInt(jicheng.acceptTime)) {
                  jicheng.acceptTime = item.acceptTime
                }
              }
            }
            jicheng.cumulativeAllocationIncome = jicheng.cumulativeAllocationIncome + item.cumulativeAllocationIncome
            jicheng.cumulativeActualIncomeAmount = jicheng.cumulativeActualIncomeAmount + item.cumulativeActualIncomeAmount
            jicheng.tax = item.tax
          }
          if (item.businessName === '施工') {
            shigong.businessName = '施工'
            // 如果收入确认时间不等于空
            if (item.incomeTime !== '') {
              // 和自定义的对象的收入确认时间对比
              if (shigong.incomeTime === '') {
                shigong.incomeTime = item.incomeTime
              } else { // 自定义的收入确认时间不为空
                // console.log('new Date(item.incomeTime)', new Date(item.incomeTime))
                // console.log('new Date(shigong.incomeTime)', new Date(shigong.incomeTime))
                if (new Date(item.incomeTime) > new Date(shigong.incomeTime)) {
                  shigong.incomeTime = item.incomeTime
                }
              }
            }
            // 如果验收时点不等于空
            if (item.acceptTime !== '') {
              // 和自定义的对象的验收时点对比
              if (shigong.acceptTime === '') {
                shigong.acceptTime = item.acceptTime
              } else { // 自定义的验收时点不为空
                if (parseInt(item.acceptTime) > parseInt(shigong.acceptTime)) {
                  shigong.acceptTime = item.acceptTime
                }
              }
            }
            shigong.cumulativeAllocationIncome = shigong.cumulativeAllocationIncome + item.cumulativeAllocationIncome
            shigong.cumulativeActualIncomeAmount = shigong.cumulativeActualIncomeAmount + item.cumulativeActualIncomeAmount
            shigong.tax = item.tax
          }
          if (item.businessName === '维护') {
            weihu.businessName = '维护'
            // 如果收入确认时间不等于空
            if (item.incomeTime !== '') {
              // 和自定义的对象的收入确认时间对比
              if (weihu.incomeTime === '') {
                weihu.incomeTime = item.incomeTime
              } else { // 自定义的收入确认时间不为空
                // console.log('new Date(item.incomeTime)', new Date(item.incomeTime))
                // console.log('new Date(weihu.incomeTime)', new Date(weihu.incomeTime))
                if (new Date(item.incomeTime) > new Date(weihu.incomeTime)) {
                  weihu.incomeTime = item.incomeTime
                }
              }
            }
            // 如果验收时点不等于空
            if (item.acceptTime !== '') {
              // 和自定义的对象的验收时点对比
              if (weihu.acceptTime === '') {
                weihu.acceptTime = item.acceptTime
              } else { // 自定义的验收时点不为空
                if (parseInt(item.acceptTime) > parseInt(weihu.acceptTime)) {
                  weihu.acceptTime = item.acceptTime
                }
              }
            }
            weihu.cumulativeAllocationIncome = weihu.cumulativeAllocationIncome + item.cumulativeAllocationIncome
            weihu.cumulativeActualIncomeAmount = weihu.cumulativeActualIncomeAmount + item.cumulativeActualIncomeAmount
            weihu.tax = item.tax
          }
          // -------End--------
        })
        console.log('设备', shebei)
        console.log('集成', jicheng)
        console.log('施工', shigong)
        console.log('维护', weihu)
        if (shebei.businessName !== '') {
          this.mobileAccrualInfo.push(shebei)
        }
        if (jicheng.businessName !== '') {
          this.mobileAccrualInfo.push(jicheng)
        }
        if (shigong.businessName !== '') {
          this.mobileAccrualInfo.push(shigong)
        }
        if (weihu.businessName !== '') {
          this.mobileAccrualInfo.push(weihu)
        }
        // this.mobileAccrualInfo = res.mobileAccrualInfo

        // 上传附件参数设定
        this.canshu.Year = this.queryInfo.year
        this.canshu.SerialNo = this.queryInfo.serialNo
        this.canshu.ProjectName = this.queryInfo.projectName
        // console.log(this.queryInfo.serialNo)
        // console.log(this.queryInfo.projectName)
        // console.log(this.canshu.ProjectID)
        // console.log(this.canshu.Uploader)
        // console.log(this.canshu.Year)
        // console.log(this.canshu.SerialNo)
        // console.log(this.canshu.ProjectName)

        // 附件分类放入相应的数据列表里
        res.data.fujians.forEach(item => {
          item.createTime = formateDate2(item.createTime)
          if (item.fileKind === '下家合同') {
            this.contractlist.push(item)
          } else if (item.fileKind === '上家合同') {
            this.contract2list.push(item)
          } else if (item.fileKind === '开工报告') {
            this.contract3list.push(item)
          } else if (item.fileKind === '到货单') {
            this.contract4list.push(item)
          } else if (item.fileKind === '上线报告') {
            this.contract5list.push(item)
          } else if (item.fileKind === '竣工报告') {
            this.contract6list.push(item)
          } else if (item.fileKind === '终验证书') {
            this.contract7list.push(item)
          } else if (item.fileKind === '业主验收') {
            this.contract8list.push(item)
          } else if (item.fileKind === '供应链订单') {
            this.contract9list.push(item)
          }
        })
        // this.queryInfo = res.data[0]
        // res.data[0].fujians.forEach(item => {
        //   if (item.fileKind === '下家合同') {
        //     this.contractlist.push(item)
        //   } else if (item.fileKind === '上家合同') {
        //     this.contract2list.push(item)
        //   }
        // })
        // this.contractlist = res.data[0].fujians
        // console.log(this.contractlist)
        // console.log(this.contract2list)
      }
      // this.tesklist = res.data.items
      // this.total = res.data.total
      // console.log('tesklist简化')
      // console.log(this.tesklist)
    },
    // 下家合同上传前执行函数
    beforeupload0(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '工作联系单'
      console.log(this.queryInfo)
      console.log(this.canshu)
    },
    // 下家合同上传前执行函数
    beforeupload(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '下家合同'
      console.log(this.queryInfo)
      console.log(this.canshu)
    },
    // 上家合同上传前执行函数
    beforeupload2(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '上家合同'
      console.log(this.canshu)
    },
    // 开工报告上传前执行函数
    beforeupload3(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '开工报告'
      console.log(this.canshu)
    },
    // 单货单上传前执行函数
    beforeupload4(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '到货单'
      console.log(this.canshu)
    },
    // 上线报告上传前执行函数
    beforeupload5(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '上线报告'
      console.log(this.canshu)
    },
    // 竣工报告上传前执行函数
    beforeupload6(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '竣工报告'
      console.log(this.canshu)
    },
    // 终验证书上传前执行函数
    beforeupload7(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '终验证书'
      console.log(this.canshu)
    },
    // 业主验收上传前执行函数
    beforeupload8(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '业主验收'
      console.log(this.canshu)
    },
    // 供应链订单上传前执行函数
    beforeupload9(file) {
      // 上传附带参数赋值
      // console.log(file)
      this.canshu.FileKind = '供应链订单'
      console.log(this.canshu)
    },
    // 下载附件
    async DownloadFile(fileId, fileName) {
      console.log(fileId)
      // const { data: res } = await this.$http.get({
      //   url: '/downloadfile/' + fileId,
      //   type: 'blob'
      // })
      const { data: res } = await this.$http.get('/downloadfile/' + fileId)
      let blob = new Blob([res], {
        type: 'application/msword'
      })
      // application/msword为word类型文档,new Blob 中的type类型可在下面的截图中查看
      if (window.navigator && window.navigator.msSaveOrOpenBlob) {
        // IE
        window.navigator.msSaveOrOpenBlob(blob, fileName)
      } else {
        let objectUrl = (window.URL || window.webkitURL).createObjectURL(
          blob
        )
        let downFile = document.createElement('a')
        downFile.style.display = 'none'
        downFile.href = objectUrl
        downFile.download = fileName // 下载后文件名
        document.body.appendChild(downFile)
        downFile.click()
        document.body.removeChild(downFile) // 下载完成移除元素 // window.location.href = objectUrl
        window.URL.revokeObjectURL(objectUrl) // 只要映射存在，Blob就不能进行垃圾回收，因此一旦不再需要引用，就必须小心撤销URL，释放掉blob对象。
      }
      // if (window.navigator.msSaveOrOpenBlob) {
      //   console.log('执行1')
      //   navigator.msSaveBlob(file.raw, file.name)
      // } else {
      //   console.log('执行2')
      //   var link = document.createElement('a')
      //   // console.log(document)
      //   // console.log(link)
      //   link.download = file.name
      //   // console.log(link.download)
      //   // link.href = window.URL.createObjectURL(file.raw)
      //   link.href = file.url
      //   // console.log(link.href)
      //   link.click()
      //   window.URL.revokeObjectURL(link.href)
      // }

      // if (res.meta.status !== 200) {
      //   return this.$message.error('下载失败！')
      // }
      // if (res.meta.status === 200) {
      //   return this.$message.success('附件上传成功！')
      // }
    },
    showEditDialog(id) {
      // console.log(id)
      // const { data: res } = await this.$http.get('tesksec/' + id)
      // console.log(res)
      // if (res.meta.status !== 200) {
      //   return this.$message.error('查询任务信息失败！')
      // }
      this.editTeskDialogVisible = true
    },
    // 监听修改任务对话框的关闭事件
    editTeskDialogClosed() {
      // 清空表单内容
      this.$refs.editFormRef.clearValidate()
      // 清空上传组件内容
      // this.$refs.upload1.clearFiles();
      // this.$refs.upload2.clearFiles();
      // this.$refs.upload3.clearFiles();
      // this.list1=[]
      // this.editForm.filelist1=[]
      // this.list2=[]
      // this.editForm.filelist2=[]
      // this.list3=[]
      // this.editForm.filelist3=[]
    },
    // 下载附件
    handlePreview(file) {
      console.log('file')
      console.log(file)
      console.log(file.url)
      // const { data: res } = this.$http.get('http://192.168.1.25:100/api/download/LdH3ESOy6SnQbg54cTbvbQVEKpWIgcoBQxm%5ENaMORPly0i4rJlK%5EylAgnqhzmmQL')
      // console.log(res)
      // console.log(this.editForm.filelist1)
      // console.log(file.response.data[0].fileCode)
      // console.log(window.navigator.msSaveOrOpenBlob)
      if (window.navigator.msSaveOrOpenBlob) {
        console.log('执行1')
        navigator.msSaveBlob(file.raw, file.name)
      } else {
        console.log('执行2')
        var link = document.createElement('a')
        // console.log(document)
        // console.log(link)
        link.download = file.name
        // console.log(link.download)
        // link.href = window.URL.createObjectURL(file.raw)
        link.href = file.url
        // console.log(link.href)
        link.click()
        window.URL.revokeObjectURL(link.href)
      }
      // const { data: res } = await this.$http.get('download/' + file.response.data[0].fileCode)
      // console.log(res)
    },
    // 删除附件
    DeteleFile(fileId, originFileName, fileFullPath) {
      this.$confirm(`您确定删除 ${originFileName} 吗？`, '警告', { type: 'warning' }).then((msg) => {
        if (msg === 'confirm') {
          try {
            this.$http.delete('deletefile/' + fileId + '/filepath/' + fileFullPath.replace(':', '%3A').replace(/\\/g, '%5C')).then((res) => {
              if (res.data.meta.status !== 200) {
                return this.$message.error('删除附件失败！')
              }
              if (res.data.meta.status === 200) {
                this.getProjectInfo()
                return this.$message.success('删除附件成功！')
              }
            })
            // console.log(res.meta)
          } catch (e) {
            // TODO handle the exception
            console.log('服务器文件删除失败')
          }
        }
      }).catch(function (err) {
        // 捕获异常
        console.log(err)
      })
    },
    // 文件超出个数限制时执行的函数
    handleExceed(files, fileList) {
      this.$message.warning(`当前限制选择 3 个文件，本次选择了 ${files.length} 个文件，共选择了 ${files.length + fileList.length} 个文件`)
    },
    // 附件删除前执行的函数
    beforeRemove(file) {
      return this.$confirm(`确定移除 ${file.name}？`)
    },
    // 上传文件后执行上传列表字符串拼接1
    handlesuccess1(res) {
      console.log(res)
      // 修改合同签订日期

      if (res.code !== 200) {
        return this.$message.error('附件上传失败！')
      }
      if (res.code === 200) {
        // 隐藏对话框
        this.UploadDialogVisible = false
        // 重新加载项目数据
        this.getProjectInfo()
        return this.$message.success('附件上传成功！')
      }
    },
    // 上传文件后执行上传列表字符串拼接2
    handlesuccess2(response) {
      // 1. 拼接得到一个图片信息对象
      const picInfo = response.data[0].fileCode
      const picName = response.data[0].originFileName
      // 2. 将图片信息对象，push 到pics数组中
      // this.editForm.filelist2.push(picName + '|' + picInfo)
      if (this.editForm.filelist2 == null) {
        this.editForm.filelist2 = picName + '|' + picInfo
      } else {
        this.editForm.filelist2 = this.editForm.filelist2 + ',' + picName + '|' + picInfo
      }
      console.log('this.editForm.filelist2:')
      console.log(this.editForm.filelist2)
    },
    // 上传文件后执行上传列表字符串拼接3
    handlesuccess3(response) {
      // 1. 拼接得到一个图片信息对象
      const picInfo = response.data[0].fileCode
      const picName = response.data[0].originFileName
      // 2. 将图片信息对象，push 到pics数组中
      if (this.editForm.filelist3 == null) {
        this.editForm.filelist3 = picName + '|' + picInfo
      } else {
        this.editForm.filelist3 = this.editForm.filelist3 + ',' + picName + '|' + picInfo
      }
      // this.editForm.filelist3.push(picName + '|' + picInfo)
      console.log('this.editForm.filelist3:')
      console.log(this.editForm.filelist3)
    },
    // 附件删除函数
    async handleRemove1(file, fileList) {
      console.log('删除后')
      console.log(file)
      // console.log('codeid:' + file.response.data[0].fileCode)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath.replace(':' , '%3A').replace(/\\/g, '%5C'))
      console.log(fileList)

      this.editForm.filelist1 = null
      if (fileList.length !== 0) {
        fileList.forEach(item => {
          if (this.editForm.filelist1 == null) {
            this.editForm.filelist1 = item.name + '|' + item.url.replace('http://172.25.161.19:100/api/download/', '')
          } else {
            this.editForm.filelist1 = this.editForm.filelist1 + ',' + item.name + '|' + item.url.replace('http://192.172.25.161.19.1.25:100/api/download/', '')
          }
        })
      }
      console.log('this.editForm.filelist1')
      console.log(this.editForm.filelist1)
      try {
        const { data: res } = await this.$http.delete('file/' + file.response.data[0].fileCode + '/filepath/' + file.response.data[0].fileFullPath.replace(':', '%3A').replace(/\\/g, '%5C'))
        if (res.meta.status !== 200) {
          return this.$message.error('删除附件失败！')
        }
        console.log(res.meta)
      } catch (e) {
        // TODO handle the exception
        console.log('服务器文件删除失败')
      }
      // const { data: res } = await this.$http.get('download/' + file.response.data[0].fileCode)
    },
    async handleRemove2(file, fileList) {
      console.log('删除后')
      console.log(file)
      // console.log('codeid:' + file.response.data[0].fileCode)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath.replace(':' , '%3A').replace(/\\/g, '%5C'))
      console.log(fileList)
      this.editForm.filelist2 = null
      if (fileList.length !== 0) {
        fileList.forEach(item => {
          if (this.editForm.filelist2 == null) {
            this.editForm.filelist2 = item.name + '|' + item.url.replace('http://172.25.161.19:100/api/download/', '')
          } else {
            this.editForm.filelist2 = this.editForm.filelist2 + ',' + item.name + '|' + item.url.replace('http://172.25.161.19:100/api/download/', '')
          }
        })
      }
      console.log('this.editForm.filelist2')
      console.log(this.editForm.filelist2)
      try {
        const { data: res } = await this.$http.delete('file/' + file.response.data[0].fileCode + '/filepath/' + file.response.data[0].fileFullPath.replace(':', '%3A').replace(/\\/g, '%5C'))
        if (res.meta.status !== 200) {
          return this.$message.error('删除附件失败！')
        }
        console.log(res.meta)
      } catch (e) {
        // TODO handle the exception
        console.log('服务器文件删除失败')
      }
      // const { data: res } = await this.$http.get('download/' + file.response.data[0].fileCode)
    },
    async handleRemove3(file, fileList) {
      console.log('删除后')
      console.log(file)
      // console.log('codeid:' + file.response.data[0].fileCode)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath)
      // console.log('fileFullPath:' + file.response.data[0].fileFullPath.replace(':' , '%3A').replace(/\\/g, '%5C'))
      console.log(fileList)
      this.editForm.filelist3 = null
      if (fileList.length !== 0) {
        fileList.forEach(item => {
          if (this.editForm.filelist3 == null) {
            this.editForm.filelist3 = item.name + '|' + item.url.replace('http://172.25.161.19:100/api/download/', '')
          } else {
            this.editForm.filelist3 = item.editForm.filelist3 + ',' + item.name + '|' + item.url.replace('http://172.25.161.19:100/api/download/', '')
          }
        })
      }
      console.log('this.editForm.filelist3')
      console.log(this.editForm.filelist3)
      try {
        const { data: res } = await this.$http.delete('file/' + file.response.data[0].fileCode + '/filepath/' + file.response.data[0].fileFullPath.replace(':', '%3A').replace(/\\/g, '%5C'))
        if (res.meta.status !== 200) {
          return this.$message.error('删除附件失败！')
        }
        console.log(res.meta)
      } catch (e) {
        // TODO handle the exception
        console.log('服务器文件删除失败')
      }
      // const { data: res } = await this.$http.get('download/' + file.response.data[0].fileCode)
    },
    showUploadDialog() {
      function formateDate() {
        function addzero(num) {
          return (num < 10 ? '0' + num : num)
        }
        // console.log(datetime)
        var date = new Date()

        return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate())
      }
      console.log('date', formateDate())
      // 签订日期输入框赋值
      this.projectInfo.contractSignTime = formateDate()
      // 清空上传列表
      this.list1 = []
      this.UploadDialogVisible = true
    },
    async submitUpload() {
      // 上传附件
      this.$refs.upload1.submit()
      // 日期格式转换
      function formateDate(datetime) {
        // console.log('日期格式转换')
        // console.log(datetime)
        function addzero(num) {
          return (num < 10 ? '0' + num : num)
        }
        // console.log(datetime)
        if (datetime === null) {
          return
        }
        var date = new Date(datetime)
        return date.getFullYear() + '-' + (addzero(date.getMonth() + 1)) + '-' + addzero(date.getDate())
      }
      console.log('日期修改前', this.projectInfo.contractSignTime)
      this.projectInfo.contractSignTime = formateDate(this.projectInfo.contractSignTime)

      // 修改合同签订时间
      const { data: res } = await this.$http.put('projectid/' + this.$route.query.id, this.projectInfo)
      console.log('修改合同签订日期上传的参数', this.projectInfo.contractSignTime)
      if (res.meta.status !== 200) {
        return this.$message.error('合同签订日期修改失败！')
      }
      // console.log(this.list1)
      // 创建新的数据对象
      // let newFormData = new FormData()
      // let fileName = []//存储文件名字
      // this.list1.forEach(file=>{
      // newFormData.append('file',file.raw)
      // fileName.push(file.name)
      // })
      // newFormData.append('fileName',fileName)
      // console.log(newFormData.getAll('file'))//查看文件信息
      // -----------------------------------
      // const { data: res2 } = await this.$http.post('uploadfiles', {
      // files:newFormData
      // })

      // if (res2.meta.status !== 200) {
      //   return this.$message.error('上传失败！')
      // }
    },
    showstartReportDialog() {
      console.log('this.queryInfo', this.queryInfo)
      this.print.supplier = ''
      this.print.supervisor = ''
      this.print.entrustTime = ''
      this.print.finishTime = ''
      this.print.prepare = ''
      this.print.problem = ''
      this.print.owner = ''
      this.print.riqi = ''
      this.print.riqi2 = ''
      this.print.riqi3 = ''
      this.startReportDialogVisible = true
      this.isshow = true
    },
    startReportDialogClosed() {
      this.startReportDialogVisible = false
    },
    UploadDialogClosed() {
    },
    fuzhi() {
      this.print.supplier = this.queryInfo.supplier
      this.print.supervisor = this.printBefore.supervisor
      this.print.entrustTime = this.queryInfo.entrustTime
      this.print.finishTime = this.formateDate(this.printBefore.finishTime)
      this.print.prepare = this.printBefore.prepare
      this.print.problem = this.printBefore.problem
      this.print.owner = this.printBefore.owner
      this.print.riqi = this.formateDate(this.printBefore.riqi)
      this.print.riqi2 = this.formateDate(this.printBefore.riqi2)
      this.print.riqi3 = this.formateDate(this.printBefore.riqi3)
      this.isshow = false
      this.startReportDialogVisible = false
    }
  }
}
</script>

<style lang="less" scoped>
.text {
  font-size: 14px;
}
.item {
  margin-bottom: 18px;
}
.clearfix:before,
.clearfix:after {
  display: table;
  content: "";
}
.clearfix:after {
  clear: both
}
.nfive:hover {
  font-weight: bold;
}
.topleft {
  border-top: 1px solid #000000;
  border-left: 1px solid #000000;
}
.bottomright {
  border-bottom: 1px solid #000000;
  border-right: 1px solid #000000;
}
.ds{
  display:none;
}
.table { border:3px solid #000000; border-collapse: collapse; color: #000; font-family: '宋体'; }
.table tr th, .table tr td { border:1px solid #000000; font-size: 20px; padding: 12px;}
</style>
